package com.rtz.util;

public class RespResult<T> {

	private T data;

	private String code;

	private String msg;

	
	public RespResult(T data, ResultCode code) {
		super();
		this.data = data;
		this.code = code.getCode();
		this.msg = code.getMsg();
	}

	public RespResult(T data, String code,String msg) {
		super();
		this.data = data;
		this.code = code;
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(T data) {
		this.data = data;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	@Override
	public String toString() {
		return "Result [data=" + data + ", code=" + code + ", msg=" + msg + "]";
	}

}
